package com.cherish.meeting.common.util;

import org.springframework.util.StringUtils;

public class StringUtil {

    public final static String UNDEFINED = "undefined";

    public static boolean isNumber(Object obj) {
        if (obj instanceof Integer
                || obj instanceof Long
                || obj instanceof Double) {
            return true;
        }
        return false;
    }

    public static boolean isMobile(String str) {
        return isEmpty(str);
    }

    public static boolean isRealName(String str) {
        return isEmpty(str);
    }

    public static boolean isNickName(String str) {
        return isEmpty(str);
    }

    public static boolean hasEmptyItem(String... strs) {
        for (String str : strs) {
            if (isEmpty(str)) {
                return true;
            }
        }
        return false;
    }

    public static boolean isEmpty(String str) {
        if (StringUtils.isEmpty(str)) {
            return true;
        }
        if (UNDEFINED.equalsIgnoreCase(str)) {
            return true;
        }
        return false;
    }

    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }

}
